<?php

class products extends Controller
{

	public function index()
    {
    }
    
	public function show($product_id)
	{
	    
	    if (isset($product_id)) {
	    	$product = $this->model->getProduct($product_id);
			$digitalContent = $this->model->getDigitalContent($product->digital_content_id);
	    	//print "<pre>" . print_r($digitalContent , true ) . "<pre>";
	    	// load views
	    	require APP . 'views/site_templates/header.php';
	        require APP . 'views/products/showProduct.php';
	        require APP . 'views/site_templates/footer.php';
	    } else {
	    	//header('location: ' . URL . 'home');
	    }
	}
}
